<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{$Think.config.WEB_TITLE}</title>
<link style="text/css" rel="stylesheet" href="__ADMIN__/Css/index.css">
<script type="text/javascript" src="__ADMIN__/Js/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	var $href	=	window.location.href;
	$(".listtr  a").click(function(){
		$rel	=	$(this).attr('rel');
		$bools	=	$href.search("desc");
		if( $bools	!==	-1 ){
			window.location.href="__URL__/viewComment/sort/"+$rel+"/order/asc";
		}else{
			window.location.href="__URL__/viewComment/sort/"+$rel+"/order/desc";
		} 
	});
	//如果是进行排序 
	if(  $href.indexOf('order') !== -1 ){
		//添加一个排序小标签.得到top.html传过来的区块名
		$module_name	=	$(".module").val();
		$href	=	window.location.href;
		$textinfo	=	$href.split($module_name);
		$textinfo1	=	$textinfo[1].split("/");	
		//得到排序名和排序值
		$order_type	=	$textinfo1[3];
		$order_value=	$textinfo1[5];
		$("."+$order_type).addClass($order_value); 
	}
});
//筛选函数
function filter(){
	var search_name = $(".search_select").val();
	var search_input = $(".search_input").val();
	if( search_input == '' ){
		alert('请输入查询关键字');
	}else{
		location="__URL__/viewComment/searchName/"+search_name+"/searchVal/"+search_input;
	}
}
</script>
</head>
<body>
<div id="wrap_body">
	<!-- 包含公用头部 -->
	<include file="Public:top" />

	<div class="ma_content">
		<div class="breadcrumb">
        	<a href="{:U('Admin/Text/viewComment')}">首页</a>
    	</div>
    	<div class="box">
    		<div class="heading">
      			<h1><img alt="" src="__ADMIN__/Images/comment.png">查看评论</h1>
      			<ul class="heading_ul">
      				<a class="button" onclick="if(confirm('确认删除?')){ $('#form').submit(); }">删除</a>
      			</ul>
   		 	</div>
   		 	<!-- end heading -->
   		 	<div class="filter">
   		 		<table>
   		 			<tr class="filter_tr">
   		 				<td>
   		 					<select name="search_name" class="search_select">
   		 						<option value="name" <php> if($_GET['searchName'] == 'name'){echo "selected='selected'";} </php> >用户名</option>
   		 						<option value="email" <php> if($_GET['searchName'] == 'email'){echo "selected='selected'";} </php> >邮件</option>
   		 						<option value="content" <php> if($_GET['searchName'] == 'content'){echo "selected='selected'";} </php> >内容</option>
   		 					</select>
   		 				</td>
   		 				<td>
   		 					<input type="text" name="search_value" value="<php>echo $_GET['searchVal'];</php>" class="form_input search_input" />
   		 				</td>
   		 				<td>
   		 					<input type="button" value="查找" name="search" class="button search_button" onclick="filter();"/>
   		 				</td>
   		 			</tr>
   		 		</table>
   		 	</div>
   		 	<!-- end filter -->
   		 	<form action="__URL__/delComment" method="post" id="form">
				<table class="list">
					<thead>
						<tr class="listtr">
							<td width="5%" style="text-align: center;">
								<input type="checkbox" onclick="$('input[name*=\'selected\']').attr('checked', this.checked);">
							</td>
							<td width="5%" class="left">
								<a rel="name" class="name">用户名</a>
							</td>
							<td width="15%" class="left">
								<a rel="title" class="title">标题</a>
							</td>
							<td width="10%" class="left">
								<a rel="email" class="email">邮件</a>
							</td>
							<td width="30%" class="left">
								<a rel="content" class="contetn">内容</a>
							</td>
							<td width="10%" class="center">
								<a rel="datetime" class="datetime">留言时间</a>
							</td>
						</tr>
					</thead>
					<tbody>
						<volist name="list" id="vo">
							<tr>
				                <td style="text-align: center;">       
				              		<input type="checkbox" value="{$vo.id}" name="selected[]">
				                </td>
				                <td class="left">{$vo.name}</td>
				                <td class="left">{$vo.blogTitle}</td>
				                <td class="left">{$vo.email}</td>
				                <td class="left">{$vo.content|strip_tags|msubstr=###,0,40}</td>
				                <td class="center">{$vo.datetime}</td>
				            </tr>
						</volist>
					</tbody>
				</table>
			</form>
			<!-- end form -->
			<div id="page">
				每页显示{$Think.config.PAGESIZE}条记录&nbsp;|&nbsp;共{$show}
			</div>
			<!-- end page -->
    	</div>
	</div>
	<!-- end ma_content -->
	
	<!-- 包含公用尾部 -->
	<include file="Public:footer" />
</div>
</body>
</html>
